package cn.tedu.ivos.dictoption.pojo.dto;

import cn.tedu.ivos.base.annotation.IntegerOnly;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class DictOptionAddParam {
    @Schema(description = "字典项ID")
    private Long id;

    @Schema(description = "字典ID")
    private Long dictId;

    @Schema(description = "字典项名称")
    @NotBlank(message = "字典项名称不能为空")
    private String label;

    @Schema(description = "字典项值")
    @NotBlank(message = "字典项值不能为空")
    private String value;

    @Schema(description = "排序")
    @NotNull(message = "排序不能为空")
    @IntegerOnly(message = "字典排序必须为整数")
    private Integer sort;

    @Schema(description = "备注信息")
    @NotBlank(message = "备注信息不能为空")
    private String remark;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    @Schema(description = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date updateTime;
}
